var express = require('express');
var router = express.Router();
const{ getOrderWaiting_2, getAllOrder_2, modifyOrderStatus_2 } = require("../service/ordersService.js");
//待发货数据获取
router.get('/getOrderWaiting', async function(req, res, next) {
    let result = await getOrderWaiting_2(req.query);
    res.send(result);
});

// 修改发货状态
router.post('/modifyOrderStatus', async function(req, res, next) {
    let result = await modifyOrderStatus_2(req.body);
    res.send(result);
});

// 获取所有数据
router.get('/getAllOrder', async function(req, res, next) {
    let result = await getAllOrder_2(req.query);
    res.send(result);
});

module.exports = router;